package com.lyf.service;

import java.util.List;

import com.lyf.dao.TaskDao;
import com.lyf.pojo.Task;

public class TaskService {

	private TaskDao dao;

	//set,
	public void setDao(TaskDao dao) {
		this.dao = dao;
	}

	//method
	public void save(Task task) {
		dao.saveOrUpdate(task);
	}

	public List<Task> findAllByGoalId(String id) {
		return dao.findAllByGoalId(id);
	}

	public Task findById(String id) {
		return dao.get(id);
	}

	public List<Task> findByEmployeeId(String employeeid,String projectid) {
		return dao.findByEmployeeId(employeeid,projectid);
	}
	
	
	
}
